<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>中国刊网-期刊内容</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link href="../css/content.css" rel="stylesheet" type="text/css" />

<script src="js/jquery-1.9.1.js" type="text/javascript"></script>
<script src="js/jquery.json-2.4.js" type="text/javascript"></script>

<script type="text/javascript">
$(function(){
	$.ajax({
		type : "post",
		url : "http://localhost:8080/ejuornal/perPeriodical/perPeriodicalUpNext.action",
		data : "perPeriodical.perPeriodicalId="+$("#perPeriodicalId").val(),
		success : function(text){
			var obj = new Function("return" + text)();//得到后台获得的ID号
			if(obj[0]!=0 && obj[1]!=0) {
				$("#upPerPeriodical").attr("href", "perPeriodical/perPeriodicalId?perPeriodical.perPeriodicalId=" + obj[0]);
				$("#nextPerPeriodical").attr("href", "perPeriodical/perPeriodicalId?perPeriodical.perPeriodicalId=" + obj[1]);
			} else if(obj[0] == 0) {
				$("#nextPerPeriodical").attr("href", "perPeriodical/perPeriodicalId?perPeriodical.perPeriodicalId=" + obj[1]);
			} else if(obj[1] == 0) {
				$("#upPerPeriodical").attr("href", "perPeriodical/perPeriodicalId?perPeriodical.perPeriodicalId=" + obj[0]);
			}
		}
	});
});
</script>

</head>

<body>
	This is my JSP page.
	<br>
</body>
</html>
